package com.ruoyi.app.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.app.entity.SignIn;
import com.ruoyi.app.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface SigInMapper extends BaseMapper<SignIn> {


    @Select(" select * from t_sign_in where DATE_FORMAT(create_time,'%Y-%m-%d') = #{formatDate} and user_id = #{userId}  ")
    SignIn queryUserDate(@Param("userId") String userId, @Param("formatDate") String formatDate);


    @Select(" select id, user_id ,  DATE_FORMAT(create_time , '%Y-%m-%d') as create_time from t_sign_in where DATE_FORMAT(create_time , '%Y-%m-%d') = #{formatDate} and user_id = #{userId}  ")
    SignIn queryDate(@Param("userId") String userId, @Param("formatDate") String formatDate);
}